home *** CD-ROM | disk | FTP | other *** search
- /* 00010000
- * Name: GOPCLIST REXX 00020000
- * VM TCP/IP Network GOPHER Client transaction status 00030000
- * Author: Rick Troth, Rice University, Information Systems 00040000
- * Date: 1993-Jan-12 00050000
- * 00060000
- * Input: zero or more connection status messages 00070000
- * Output: -none- 00080000
- */ 00090000
- 00100000
- /* 00110000
- * Copyright 1992 Richard M. Troth. This software was developed 00120000
- * with resources provided by Rice University and is intended 00130000
- * to serve Rice's user community. Rice has benefitted greatly 00140000
- * from the free distribution of software, therefore distribution 00150000
- * of unmodified copies of this material is not restricted. 00160000
- * You may change your own copy as needed. Neither Rice 00170000
- * University nor any of its employees or students shall be held 00180000
- * liable for damages resulting from the use of this software. 00190000
- */ 00200000
- 00210000
- Trace "OFF" 00220000
- 00230000
- /* sync with input */ 00240000
- 'PEEKTO' 00250000
- If rc ^= 0 Then Exit rc * (rc ^= 12) 00260000
- 00270000
- /* abort if we're not in a 370 mode machine */ 00280000
- Parse Value Diag(08,'QUERY SET') With . "MACHINE" mach . ',' . '15'x . 00290000
- If mach ^= "370" & mach ^= "" Then Do 00300000
- 'CALLPIPE *: | HOLE' 00310000
- Exit rc 00320000
- End /* If .. Do */ 00330000
- 00340000
- /* fetch fs. stem variable from GlobalVs */ 00350000
- 'CALLPIPE COMMAND GLOBALV SELECT GOPHER LIST | DROP' , 00360000
- '| LOCATE 1-4 / FS./ | SPEC /=/ 1 2-* NEXT | VARLOAD' 00370000
- If ^Datatype(fs.tube,'X') Then fs.tube = "" 00380000
- 00390000
- /* prepare for dynamic connection statistics */ 00400000
- _wid = fs.scrcols - 2 00410000
- _sba = c2x(sba(1,-1) || '1D60'x) 00420000
- 00430000
- 'CALLPIPE *: | CHOP ' _wid '| PAD' _wid , 00440000
- '| SPEC /00C3' || _sba || '/ X2C 1 1-* NEXT' , 00450000
- '| FULLSCR' fs.tube 'NOREAD | HOLE' 00460000
- 00470000
- Exit rc 00480000
- 00490000
- 00500000
- 00510000
- /* ----------------------------------------------------------------- SBA00520000
- * (a better SBA function extracted from PIPEDEMO; thanks, Chuck!) 00530000
- * Construct Set Buffer Address order from row and column. 00540000
- */ 00550000
- 00560000
- SBA: Procedure Expose fs. 00570000
- 00580000
- arg row , col, . 00590000
- row = Trunc(row) 00600000
- col = Trunc(col) 00610000
- 00620000
- /*-----------------------------------------------------------------*/ 00630000
- /* Calculate binary address. */ 00640000
- /*-----------------------------------------------------------------*/ 00650000
- 00660000
- offset = row * fs.scrcols + col 00670000
- Do While offset < 0; offset = offset + fs.scrrows * fs.scrcols; End 00680000
- 00690000
- if fs.14bit then return '11'x || d2c(offset,2) 00700000
- 00710000
- /*-----------------------------------------------------------------*/ 00720000
- /* Convert to six-bit format. (xxxx111111111111 -> 0011111100111111*/ 00730000
- /*-----------------------------------------------------------------*/ 00740000
- 00750000
- 'CALLPIPE var offset' , /* Start with char number. */00760000
- '| spec 1-* d2c 1.2 right' , /* Convert to binary. */00770000
- '| spec 1-* c2b 1' , /* Convert to bit string. */00780000
- '| spec /00/ 1 5.6 3' , /* Place first six bits. */00790000
- '/00/ 9 11.6 11' , /* Place second six bits. */00800000
- '| spec 1-* b2c 1' , /* Convert back to binary. */00810000
- '| xlate *-* 00-3F 40-7F' , /* Translate to coded */00820000
- '01-09 C1-C9' , /* buffer address. */00830000
- '11-19 D1-D9' , /* */00840000
- '22-29 E2-E9' , /* */00850000
- '30-39 F0-F9' , /* */00860000
- '| spec x11 1 1.2 2' , /* Prefix with SBA order. */00870000
- '| var offset' /* Put back in variable. */00880000
- 00890000
- Return offset 00900000
- 00910000
-